import java.util.Scanner;

public class Answer3 {
    // 杨辉三角
    //https://www.nowcoder.com/practice/e671c6a913d448318a49be87850adbcc?tpId=290&tqId=39928&ru=/exam/oj
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        // 注意 hasNext 和 hasNextLine 的区别
        while (in.hasNextInt()) { // 注意 while 处理多个 case
            int n = in.nextInt();
            int[][] dp=new int[n+1][n+1];
            dp[1][1]=1;
            for(int i=2;i<=n;i++){
                for(int j=1;j<=i;j++){
                    dp[i][j]=dp[i-1][j]+dp[i-1][j-1];
                }
            }

            for(int i=1;i<=n;i++){
                for(int j=1;j<=i;j++){
                    System.out.printf("%5d", dp[i][j]);
                }
                System.out.println();
            }
        }
    }

}
